﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/AfterLogin.master" AutoEventWireup="true" CodeFile="after_login_home.aspx.cs" Inherits="common_after_login_home" %>
<%------------------------ Jifen create 2013.06.05 -------------------------%>

<asp:Content ID="Content3" ContentPlaceHolderID="leftMenu" Runat="Server">

<ul>
     <li><a href="<%= Page.ResolveUrl("~/product/insurance/insurance_home.aspx")%>">Logout</a></li>
</ul>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="content" Runat="Server">

    <h1>Notification Board</h1>
    <p>
        
          
        <asp:GridView ID="gv_alertList" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="alertId"  BackColor="White" 
            BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            ForeColor="Black" GridLines="Vertical" onselectedindexchanged="gv_alertList_SelectedIndexChanged" 
            >
            <AlternatingRowStyle BackColor="White" />
            <Columns>
            <asp:TemplateField HeaderText="No." >
                  <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                     <asp:HiddenField ID="hd_alertId" Value='<%# Bind("alertId") %>' runat="server" />
                 </ItemTemplate>
             </asp:TemplateField>

                <asp:BoundField DataField="category" HeaderText="Alert Category" 
                    SortExpression="category" >
                </asp:BoundField>
                <asp:BoundField DataField="info" HeaderText="Information" SortExpression="info">
                <ItemStyle Width="300px" />
                </asp:BoundField>
                <asp:BoundField DataField="custId" HeaderText="custId" SortExpression="custId" 
                    Visible="False" />
                <asp:HyperLinkField DataNavigateUrlFields="URL" DataTextField="URL" 
                    HeaderText="Check Detail" />
                <asp:CommandField ButtonType="Button" SelectText="Delete" 
                    ShowSelectButton="True" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <RowStyle BackColor="#F7F7DE" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#FBFBF2" />
            <SortedAscendingHeaderStyle BackColor="#848384" />
            <SortedDescendingCellStyle BackColor="#EAEAD3" />
            <SortedDescendingHeaderStyle BackColor="#575357" />
        </asp:GridView>
        
          
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
    <table class="style1">
        <tr>
            <td>
                <h1 align="center">Income Overview</h1>&nbsp;</td>
            <td>
                <h1 align="center">Expenses Overview</h1>&nbsp;</td>
        </tr>
        <tr>
            <td align="center">
                &nbsp;&nbsp;<asp:Chart ID="ChartPositive" runat="server" 
        DataSourceID="SqlDataSourceTransactionPositive">
        <Series>
            <asp:Series ChartType="Pie" Name="Series1" XValueMember="transactionType" 
                YValueMembers="Amount">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
            </td>
            <td align="center">
                &nbsp;&nbsp; &nbsp;<asp:Chart ID="ChartNegative" runat="server" 
                    DataSourceID="SqlDataSourceTransactionPayment">
        <Series>
            <asp:Series ChartType="Pie" Name="Series1" XValueMember="transactionType" 
                YValueMembers="Amount">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
            </td>
        </tr>
        <tr>
            <td>
                <asp:SqlDataSource ID="SqlDataSourceTransactionPositive" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT transactionType, SUM(transactionAmount) AS Amount FROM SUMMARY WHERE (transactionAmount &gt; 0)
and accountNo=@accountNo 

 GROUP BY transactionType">
                    <SelectParameters>
                        <asp:SessionParameter Name="accountNo" SessionField="savingAccountNo" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td>
                <asp:SqlDataSource ID="SqlDataSourceTransactionPayment" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT transactionType, SUM(transactionAmount) AS Amount FROM SUMMARY WHERE (transactionAmount &lt; 0)
and accountNo=@accountNo
 GROUP BY transactionType">
                    <SelectParameters>
                        <asp:SessionParameter Name="accountNo" SessionField="savingAccountNo" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    <p>
    </p>



</asp:Content>

<asp:Content ID="Content5" runat="server" contentplaceholderid="html_js">
<script type="text/javascript">
    $(document).ready(function () {
        try {
            $("#accordion").accordion();
        } catch (e) {
            console.error(e);
        }

        try {
            $("#tabs").tabs();
        } catch (e) {
            console.error(e);
        }
    });
    </script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>


